package IOFlow.IOFlowSerializeTheStream.practice;

import java.io.FileInputStream;
import java.io.IOException;
import java.io.ObjectInputStream;
import java.util.ArrayList;

public class TestF {
    public static void main(String[] args) throws IOException, ClassNotFoundException {
        //创建反序列化流的对象
        ObjectInputStream ois=new ObjectInputStream(new FileInputStream("JavaCase\\Test"));

        //读取数据
        ArrayList<Student> list=(ArrayList<Student>)ois.readObject();

        for (Student student : list) {
            System.out.println(student);
        }

        ois.close();
    }
}
